<div class="dialog-header">
    <div class="folder-dialog-info">
        <ng-container *ngIf="data.type==='folder'">
            <span class="material-icons">
                folder
            </span> 重命名
        </ng-container>
        <ng-container *ngIf="data.type !=='folder'">
            <span class="material-icons" *ngIf="data.type !=='folder'">
                article
            </span> 重命名
        </ng-container>
    </div>
    <div class="close-icon" (click)="onCancel()">
        <span class="material-icons cursor-pointer">
            close
        </span>
    </div>
</div>
<div class="d-content">
    <form [formGroup]="folderFileForm">
        <div class="form-group ">
            <label>名称</label>
            <input class="form-control" formControlName="name" type="text">
            <div *ngIf="folderFileForm.get('name').touched && folderFileForm.get('name').errors">
                <div class="text-danger" *ngIf="folderFileForm.get('name').errors?.required">
                    名称不能为空.
                </div>
            </div>
        </div>
        <div mat-dialog-actions>
            <button (click)="save()" type="submit" class="btn btn-primary btn-sm m-right-10" cdkFocusInitial>
                <i class="fas fa-save"></i>重命名
            </button>
            <button class="btn btn-danger btn-sm" (click)="onCancel()"><i class="fas fa-times-circle"></i>
                取消
            </button>
        </div>
    </form>
</div>

<div class="loading-shade" *ngIf="isLoading">
    <mat-spinner></mat-spinner>
</div>
